Skip to content

feat: automatically derive the the dependent resource type if not specified #2772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xstefank
Copy link
Collaborator

Just changing the samples for now. Let me know what you think and I can change all resources or even deprecate some other ctors.

@openshift-ci openshift-ci bot requested review from csviri and metacosm April 15, 2025 12:13
Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, it just only works with flat class hierarchy.

One ask, could you pls show what error message we get if the hierarchy is not flat? and this does not work.

@metacosm
Copy link
Collaborator

I think we had something similar to this at some point but decided to make it explicit because there were too many cases where the automatic resolution of the type was causing issues (iirc). Having a no-arg constructor might induce people to initialize their dependent resources with it and then get weird exceptions when the automatic resolution fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants